home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmFICA
- Caption = "FICA Taxes"
- ClientHeight = 2616
- ClientLeft = 1656
- ClientTop = 1740
- ClientWidth = 4092
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 7.8
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 2616
- ScaleWidth = 4092
- Begin VB.PictureBox picTax
- Height = 495
- Left = 120
- ScaleHeight = 444
- ScaleWidth = 3804
- TabIndex = 5
- Top = 1920
- Width = 3855
- End
- Begin VB.CommandButton cmdCalculate
- Caption = "Calculate FICA Taxes"
- Height = 495
- Left = 120
- TabIndex = 4
- Top = 1200
- Width = 3855
- End
- Begin VB.TextBox txtCurrent
- Height = 285
- Left = 2760
- TabIndex = 3
- Top = 720
- Width = 1215
- End
- Begin VB.TextBox txtToDate
- Height = 285
- Left = 2760
- TabIndex = 1
- Top = 240
- Width = 1215
- End
- Begin VB.Label lblCurrent
- Alignment = 1 'Right Justify
- Caption = "Earnings for the current pay period "
- Height = 495
- Left = 720
- TabIndex = 2
- Top = 600
- Width = 1935
- End
- Begin VB.Label lblToDate
- Alignment = 1 'Right Justify
- Caption = "Total earnings for this year prior to the current pay period "
- Height = 615
- Left = 0
- TabIndex = 0
- Top = 120
- Width = 2655
- End
- Attribute VB_Name = "frmFICA"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdCalculate_Click()
- Dim FicaTaxes As Single
- FicaTaxes = FICA(Val(txtToDate.Text), Val(txtCurrent.Text))
- picTax.Cls
- picTax.Print "Your FICA taxes for the current"
- picTax.Print "pay period are "; FormatCurrency(FicaTaxes)
- End Sub
- Private Function FICA(ytdEarnings As Single, curEarnings As Single) As Single
- Dim socialSecurityBenTax As Single, medicare As Single
- 'Calculate Social Security benefits tax and Medicare tax
- 'for a single pay period in 1999
- socialSecurityBenTax = 0
- If (ytdEarnings + curEarnings) <= 72600 Then
- socialSecurityBenTax = 0.062 * curEarnings
- ElseIf ytdEarnings < 72600 Then
- socialSecurityBenTax = 0.062 * (72600 - ytdEarnings)
- End If
- medicare = 0.0145 * curEarnings
- FICA = socialSecurityBenTax + medicare
- End Function
-